import cn.niit.pojo.IUserDao;
import cn.niit.pojo.UserDao;
import cn.niit.proxy.ProxyFactory;

public class Client {
    public static void main(String[] args) {
        //目标对象
        UserDao target = new UserDao();
        System.out.println(target.getClass());
        //给目标对象创建代理对象
        IUserDao proxy = (IUserDao) new ProxyFactory(target).getProxyInstance();

        System.out.println(proxy.getClass());
        System.out.println("------------");
        proxy.add();
        System.out.println("------------");
        proxy.deleate();
        System.out.println("------------");
        proxy.search();
        System.out.println("------------");
        proxy.update();
        System.out.println("------------");
    }
}
